package top.ysh.controller;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/*
    处理控制层解耦操作，针对前台不同请求执行不同方法
 */

// 继承写好的servlet,专门用于实现功能
@WebServlet("/demo/*")
public class DemoServlet extends BaseServlet {

    // 登录方法
    private void login(HttpServletRequest req, HttpServletResponse resp){
        // 调用实现方法
        userService.login();
        System.out.println("login xxx");
    }
    // 修改方法
    private void update(HttpServletRequest req, HttpServletResponse resp){
        System.out.println("update xxx");
    }
    // 删除方法
    private void delete(HttpServletRequest req, HttpServletResponse resp){
        System.out.println("delete xxx");
    }
    // 查询方法
    private void selectAll(HttpServletRequest req, HttpServletResponse resp){
        System.out.println("selectAll xxx");
    }

}
